<?php
/**
 * MAF
 * File: MAF Loader
 * @package MAF
**/

	/**
	 * PHP FIX
	 */
	if (!defined('PHP_VERSION_ID')) {

		$version = explode('.', PHP_VERSION);
    	define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
    	unset($version);

	}	# if

	/**
	 * Constants:
	**/
	define("MAF__PATH",           dirname(__FILE__));
	define("MAF__PATH__MAF",      MAF__PATH . "/maf/");
	define("MAF__PATH__PACKAGES", MAF__PATH . "/packages/");
	define("MAF__PATH__EXTRAS",   MAF__PATH . "/extras/");
	define("MAF__PATH__AUTOLOAD", MAF__PATH . "/autoload/");

	/**
	 * Includes:
	**/
	require_once(MAF__PATH__MAF . "/isset/function.isset_or.php");
	require_once(MAF__PATH__MAF . "/isset/function.isset_or_set.php");
	require_once(MAF__PATH__MAF . "/interfaces/interface.maf__i__singletone.php");
	require_once(MAF__PATH__MAF . "/maf/class.maf.php");
	require_once(MAF__PATH__MAF . "/maf/function.maf.php");
	require_once(MAF__PATH__MAF . "/e2e/class.maf__e2e.php");
	require_once(MAF__PATH__MAF . "/exceptions/exception.maf__e__exception.php");
	require_once(MAF__PATH__MAF . "/exceptions/exception.maf__e__php_exception.php");
	require_once(MAF__PATH__MAF . "/autoload/class.maf__autoload.php");

	/**
	 * Setup:
	**/
	maf()->registerE2E();
	maf()->registerAutoload();

	/**
	 * Autoload:
	**/
	require_once(MAF__PATH__AUTOLOAD . "/autoload.maf.php");
	require_once(MAF__PATH__AUTOLOAD . "/autoload.maf.exceptions.php");
	require_once(MAF__PATH__AUTOLOAD . "/autoload.maf.fso.php");
	require_once(MAF__PATH__AUTOLOAD . "/autoload.maf.helpers.php");
	require_once(MAF__PATH__AUTOLOAD . "/autoload.maf.interfaces.php");
	require_once(MAF__PATH__AUTOLOAD . "/autoload.maf.mvc.php");
	require_once(MAF__PATH__AUTOLOAD . "/autoload.maf.observer.php");
	require_once(MAF__PATH__AUTOLOAD . "/autoload.maf.uri.php");
	require_once(MAF__PATH__AUTOLOAD . "/autoload.maf.types.php");
	require_once(MAF__PATH__AUTOLOAD . "/autoload.maf.sqlgen.php");
	require_once(MAF__PATH__AUTOLOAD . "/autoload.dbug.php");
	require_once(MAF__PATH__AUTOLOAD . "/autoload.smarty.php");
	require_once(MAF__PATH__AUTOLOAD . "/autoload.maf.smarty.php");
	require_once(MAF__PATH__AUTOLOAD . "/autoload.swift.php");
	require_once(MAF__PATH__AUTOLOAD . "/autoload.firephp.php");

/* EOF */